<template>
  <view class="my_title">
    <nut-tabs v-model="tabValue" background="#fff" color="#0966ff">
      <nut-tab-pane title="普票抬头" pane-key="1" :disabled="router.params.billType == '2'"><OrdinaryInvoice></OrdinaryInvoice></nut-tab-pane>
      <nut-tab-pane title="专票抬头" pane-key="2" :disabled="router.params.billType == '1'"><SpecialInvoice></SpecialInvoice></nut-tab-pane>
    </nut-tabs>
  </view>
</template>
<script lang="ts" setup>
import { computed, ref } from "vue";
import OrdinaryInvoice from './componentOrdinary.vue'
import SpecialInvoice from './compontentSpecialIn.vue'
import {useDidShow, useRouter} from "@tarojs/taro";
const tabValue=ref<string>('1')
const router = useRouter()
useDidShow(()=>{
  if(router.params.billType == '2'){
    tabValue.value = '2'
  }
})
</script>
<style lang="scss">
page{
  background-color: #f5f5f5;
}
.nut-tab-pane{
  height: calc(100vh - 92rpx);
  overflow: auto;
  padding: 0 !important;
  background-color: #f5f5f5;
}
.my_title {
  .nut-tabs__titles {
    padding: 0;
  }
}
</style>
